using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using FastSpring.Base.Model;
using FastSpring.Utils.Model;

namespace FastSpring.Base.Support
{
    public class NameValueHelper
    {
        public static IList GetNameValueList(IList nameLists)
        {
            if (nameLists == null)
            {
                return null;
            }
            IList list = new ArrayList();
            foreach (object[] objs in nameLists)
            {
                if (objs.Length < 2)
                {
                    continue;
                }
                list.Add(new NameValue(objs[0].ToString(), objs[1].ToString()));
            }
            return list;
        }
    }
}
